/**
 * Created by Cxil 11/12/2022
 */

/**
 * @param {string} path
 * @returns {Boolean}
 */
export function isExternal(path) {
  return /^(https?:|mailto:|tel:)/.test(path)
}

/**
 * @param {string} str
 * @returns {Boolean}
 */
export function validMobile(str) {
  // const valid_map = ['13145552176', 'editor']
  // return valid_map.indexOf(str.trim()) >= 0
  return /^1[3-9]\d{9}$/.test(str)
}
export function validPassword(str) {
  const valid_map = ['123456', 'editor']
  return valid_map.indexOf(str.trim()) >= 0
}
